<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>GlassBox</title>
<script src="../javascripts/glassbox/glassbox.js" type="text/javascript"></script>
<style type="text/css">
body {
	overflow-y:scroll;
	background-image: url( ../images/bg22.jpg);
	background-attachment: fixed;
	font-family: verdana, arial, helvetica;
	font-size: 12px;
	text-align: center;
}
#wrapper {
    margin: 0 auto;
    text-align:left;
    width: 952px;
}.column {
	float:left;
	margin-top: -10px;
}#leftBox2 {
	float:left;
	margin-top: -10px;
}#topBox_contentBoxBg {
	background-image: url( ../images/22.jpg);
	background-position: -100px -600px;
	filter: alpha(opacity=80);
	-moz-opacity:.80;
	opacity:.80;
}
#topBox_content {
	padding: 1px 18px;
}
#topBox_content h1 {
	color: #000;
}
#leftBox_content,
#leftBox2_content,
#mainBox_content,
#rightBox_content {
	padding: 8px;
	
}
.active {
	text-decoration: none; 
	color: #000;
	font-weight: bold;
	
}
a, .inactive {
	text-decoration: underline; 
	color: #333;
}
</style>
<script type="text/javascript">
path_to_root_dir = "../";
var mainBox;
window.onload = function(){
	
	var skin = 'greyline';
	
	var topBox = new GlassBox();
	topBox.init( 'topBox', '952px', '120px', 'hidden', skin );
	topBox.ipos();
	
	var leftBox = new GlassBox();
	leftBox.init( 'leftBox', '200px', 'auto', 'hidden', skin );
	leftBox.ipos();
	
	var leftBox2 = new GlassBox();
	leftBox2.init( 'leftBox2', '200px', 'auto', 'hidden', skin );
	leftBox2.ipos();
	
	mainBox = new GlassBox();
	mainBox.init( 'mainBox', '550px', 'auto', 'hidden', skin );
	// mainBox.init( 'mainBox', '550px', '400px', 'auto', skin );
	mainBox.ipos();
	
	var rightBox = new GlassBox();
	rightBox.init( 'rightBox', '200px', 'auto', 'hidden', skin );
	rightBox.ipos();

};

var newPageContent, firstPageCache, firstPageCached = false;
var loadPage = function(id, linkNum) {
	var mainBox_content = $("mainBox_content");
	if(firstPageCached == false) {
		firstPageCache = mainBox_content.innerHTML;
		firstPageCached = true;
	}
	if(id == "mainBox") newPageContent = firstPageCache;
	else newPageContent = $(id).innerHTML;

	mainBox_content.innerHTML = newPageContent;
	mainBox.adjustBoxBorder();
	changeLinks(linkNum);	
} 	
var changeLinks = function(linkNum) {
	var menu = $('leftBox');
	var links = menu.getElementsByTagName('A');
	for( var i = 1; i <= links.length; i++ ){
		if(i == linkNum ) {
			links[i-1].className = "active";
			links[i-1].blur();
		}
		else links[i-1].className = "inactive";
  	}
} 	
</script>
</head>

<body>
<div id="wrapper">
		<div id="topBox">
			<h1>top box content</h1>
		</div>
	<div class="column">
		<div id="leftBox">
			<p><a href="javascript:;" onclick="loadPage('mainBox', 1)" class="active">Page 1</a></p>
			<p><a href="javascript:;" onclick="loadPage('mainBox2', 2)">Page 2</a></p>
			<p><a href="javascript:;" onclick="loadPage('mainBox3', 3)">Page 3</a></p>
		</div>
		<div id="leftBox2">
			<p>left box 2 content</p>
		</div>
	</div>
	<div id="mainBox" class="column">
		<h2>Page 1</h2>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
	</div>
	<div id="mainBox2" style="display:none;">
		<h2>Page 2</h2>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
	</div>
	<div id="mainBox3" style="display:none;">
		<h2>Page 3</h2>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
		<p>main box content</p>
	</div>
	<div id="rightBox" class="column">
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
		<p>right box content</p>
	</div>
</div>
</body>
</html>